﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace WeChatSDK.WeChatDto.Conversation.ReceivingMessage.EventMessage
{
    /// <summary>
    /// 弹出地理位置选择器的事件消息
    /// </summary>
    [XmlRoot(Namespace = "", IsNullable = false, ElementName = "xml")]
    class LocationSelectEventMessageDto : EventMessageDto
    {
        /// <summary>
        /// 事件KEY值，由开发者在创建菜单时设定
        /// </summary>
        [XmlElement("EventKey", DataType = "string")]
        public string EventKey { get; set; }
        /// <summary>
        /// 发送的位置信息
        /// </summary>
        [XmlArray("SendLocationInfo")]
        public List<SendLocationInfoDto> SendLocationInfo { get; set; }
    }
    /// <summary>
    /// 发送的位置信息
    /// </summary>
    [XmlType]
    public class SendLocationInfoDto
    {
        /// <summary>
        /// X坐标信息
        /// </summary>
        [XmlElement("Location_X", DataType = "string")]
        public string LocationX { get; set; }
        /// <summary>
        /// Y坐标信息
        /// </summary>
        [XmlElement("Location_Y", DataType = "string")]
        public string LocationY { get; set; }
        /// <summary>
        /// 精度，可理解为精度或者比例尺、越精细的话 scale越高
        /// </summary>
        [XmlElement("Scale", DataType = "string")]
        public string Scale { get; set; }
        /// <summary>
        /// 地理位置的字符串信息
        /// </summary>
        [XmlElement("Label", DataType = "string")]
        public string Label { get; set; }
        /// <summary>
        /// 朋友圈POI的名字，可能为空
        /// </summary>
        [XmlElement("Poiname", DataType = "string")]
        public string Poiname { get; set; }
    }
}
